import { request } from '../utils/request';
import { apiVirtualSuccessAccess, useVirtualAccess } from '@/utils/tools';

export async function queryListData(params) {
  if (useVirtualAccess()) {
    const result = await apiVirtualSuccessAccess({
      params,
      data: [
        { flag: 0, name: '未支付' },
        { flag: 1, name: '已支付' },
        { flag: 2, name: '已发货' },
        { flag: 3, name: '出库中' },
        { flag: 4, name: '确认收货' },
        { flag: 5, name: '正在退换货' },
        { flag: 6, name: '删除' },
        { flag: 7, name: '完成' },
        { flag: 8, name: '关闭订单' },
        { flag: 9, name: '全额退款' },
        { flag: 10, name: '部分退款' },
        { flag: 11, name: '售后' },
        { flag: 12, name: '退款' },
      ],
    });

    return result;
  }

  return request('/UserOrder/GetUserOrderState', {
    method: 'POST',
    body: params,
  });
}

/**
 * 占位函数
 *
 * @export
 * @returns
 */
export async function empty() {
  return {};
}
